﻿@model SchoolCommunicationSystem.Models.ViewPrivateMessageViewModel

@{
    ViewBag.Title = Model.Message.subject;
}
<link href="@Url.Content("~/Content/jquery.cleditor.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.cleditor.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.cleditor.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () { $("#Message_message").cleditor(); });
</script>
<h2>@Model.Message.subject</h2>
<p class="privatemessagefrom"><strong>Người gửi</strong> <a href="#">@Model.Message.UserFrom.userName</a></p>
<p class="privatemessagesent"><strong>Thời gian gửi</strong> @Model.Message.dateSent.ToShortDateString()</p>
<p class="privatemessagecontent">
    @Html.TextAreaFor(m => m.Message.message)
</p>
<div class="btn-group">
    @using (Html.BeginForm("Index", "PrivateMessage"))
    {    @Html.AntiForgeryToken()
        <input type="submit" value="Hộp thư đến" />
    }
</div>
@if (Model.Message.UserFrom.userName != User.Identity.Name)
{
    <div class="btn-group">
        @using (@Html.BeginForm("Create", "PrivateMessage", new { id = Model.Message.UserFrom.userID }, FormMethod.Get))
        {
            <input type="submit" value="Hồi đáp" />
        }
    </div>
}
else
{
}